package ba.jamax.ralfdb.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import ba.jamax.ralfdb.domain.Watch;
import ba.jamax.ralfdb.persistence.repository.specific.WatchRepository;

@Controller
@RequestMapping("/watch")
public class WatchController extends AbstractController<Watch> {

    private static final String SECTION_INDEX_VIEW = "ralfdb.watch";

    public WatchController() {
        super.setMainView(SECTION_INDEX_VIEW);
    }

    @Override
	public Class<Watch> getPersistentClass() {
        return Watch.class;
    }

    @Override
	public WatchRepository getRepository() {
        return (WatchRepository) super.getRepository();
    }

    @Autowired
    public void setWatchRepository(final WatchRepository repository) {
        super.setRepository(repository);
    }
}
